﻿using System;
using VisualWip.Core;
using VisualWip.Core.Columns;

namespace VisualWip.PresentationModel.Image
{
    public class ImageColumnViewModel : ColumnViewModelBase
    {
        private readonly ImageColumn _imageColumn;

        public ImageColumnViewModel(Application application, ImageColumn column, IColumnBuilder columnBuilder)
            : base(application, column, columnBuilder)
        {
            _imageColumn = column;
        }

        public string ImagePath
        {
            get { return _imageColumn.ImagePath; }
        }

        protected override void ColumnRefreshDone(object sender, EventArgs e)
        {
            base.ColumnRefreshDone(sender, e);
            OnPropertyChanged(this, () => ImagePath);
        }
    }
}